import 'package:dailoz/size_config.dart';
import 'package:flutter/material.dart';

class LabelTypeGroup extends StatefulWidget {
  const LabelTypeGroup({
    Key? key,
    required this.labelTypeList,
    required this.height,
  }) : super(key: key);

  final double? height;
  final List<Widget>? labelTypeList;

  @override
  State<LabelTypeGroup> createState() => _LabelTypeGroupState();
}

class _LabelTypeGroupState extends State<LabelTypeGroup> {
  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.only(
        top: SizeConfig.getProportionateScreenHeight(10.0),
      ),
      child: SizedBox(
        height: widget.height,
        child: GridView.count(
          scrollDirection: Axis.vertical,
          crossAxisCount: 2,
          crossAxisSpacing: 20.0,
          mainAxisSpacing: 20.0,
          childAspectRatio: 1 / 1,
          padding: EdgeInsets.all(
            SizeConfig.getProportionateScreenHeight(10.0),
          ),
          children: widget.labelTypeList!,
        ),
      ),
    );
  }
}
